package com.jsh.erp.service;

import com.jsh.erp.datasource.entities.User;
import com.jsh.erp.feign.system.LoginRemoteClient;
import com.jsh.erp.utils.BaseResponseInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 远程调用原系统的登录和注销
 */
@Service
public class UserService {
    @Autowired
    private LoginRemoteClient loginRemoteClient;

    public BaseResponseInfo login(User user) {
        return loginRemoteClient.login(user);
    }

    public BaseResponseInfo logout() {
        return loginRemoteClient.logout();
    }
}
